# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-sphinxcontrib-websupport
pkgname=('python2-sphinxcontrib-websupport' 'python-sphinxcontrib-websupport')
_pkgname=sphinxcontrib-websupport
pkgver=2.0.0
pkgrel=1
pkgdesc='Sphinx API for Web Apps'
url='https://pypi.org/project/sphinxcontrib-websupport/#files'
arch=('any')
license=('BSD')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('2a38530db266b6eb26f200ac135a98d1ea982baae4d20fa6dbccc8ff36c6f4c4b7fe012665372c1065553cd27ebba4178127b40481e0b25363436a4a7a3920e0')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"

  python setup.py build
}

package_python2-sphinxcontrib-websupport() {
  depends=('python2')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

package_python-sphinxcontrib-websupport() {
  depends=('python')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

